package gui;

import java.awt.BorderLayout;

import javax.swing.JButton;
import javax.swing.JPanel;


/*
 * This is the Splash page when the user first runs the program. 
 * Although it doesn't add functionality its an ascetic part of the program.
 * 
 * Usage: Hitting Enter on the bottom tells the GUI to move to the front Page
 * Author: rjdunlap
 */
public class SplashPage extends JPanel{

	private static final long serialVersionUID = -2249849766869307353L;

	JButton enterButton;
	ImagePanel imagePanel;
	GUI guiObject;
	
	//Constructor, the GUI parameter is to enable action listener
	public SplashPage(GUI listener)
	{
		this.guiObject = listener;
		
		setLayout(new BorderLayout());
		
		//Enter Button Stuff
		enterButton = new JButton("Enter");
		enterButton.setActionCommand("Enter");
		enterButton.addActionListener(guiObject);		
		add(enterButton, BorderLayout.SOUTH);
		
		
		//Image in the enter		
		imagePanel = new ImagePanel("watersports1.jpg");
		add(imagePanel, BorderLayout.CENTER);
		
	}
}
